home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Project: uu**code engine
- ** Author: Bernhard S. Wieser
- ** Module: uuglue.c
- ** Date: 5/19/91
- ** Revised: 6/1/91
- ** 6/8/91
- ** Version: 1.0.2
- **
- ** Preface:
- ** uu**code engine is © by Bernhard S. Wieser and Octavian Micro
- ** development, all rights reserved. Please read the accompanying
- ** licensing agreement before use.
- */
- #include "UUGlue.h"
-
- /*
- ** UULoad
- ** Load engine, table, move them high and lock them.
- **
- ** Parameters
- ** none
- **
- ** Returns
- ** resource or memory errors
- */
- pascal OSErr UULoad(
- Handle *table, /* the base of the translate table */
- Handle *engine /* the base of the engine resource */
- )
- {
- OSErr err;
-
- err = 0;
- *table = GetResource('HEXA', 128);
- if(*table) {
- *engine = GetResource('UENG', 128);
- if(*engine) {
- MoveHHi(*table);
- MoveHHi(*engine);
- HLock(*table);
- HLock(*engine);
- }
- else {
- err = ResError();
- ReleaseResource(*table);
- }
- }
- else {
- err = ResError();
- }
- return(err);
- }
-
- /*
- ** UUnload
- ** Get rid of the uu resources.
- **
- ** Parameters
- ** none
- **
- ** Returns
- ** nothing
- */
- pascal void UUnload(
- Handle table, /* the base of the translate table */
- Handle engine /* the base of the engine resource */
- )
- {
- OSErr err;
-
- HUnlock(table);
- HUnlock(engine);
- ReleaseResource(table);
- ReleaseResource(engine);
- }
-